All Questions
Tagged with javascriptfunctional-programming
277 questions
3votes
1answer
399views
Event sourcing javascript implementation
An event source built around an observer design pattern implementation… ...
1vote
1answer
70views
Buffered source of HTMLElement(s)
Temporary storing the element(s) returned by document.querySelector and document.querySelectorAll methods could improve ...
1vote
1answer
84views
Sprinkler effect
Developed around visibility CSS property and HTMLElement#offsetHeight and ...
4votes
3answers
223views
Get the contents of a table cell for all selected rows
I have a table of user info. When you click the button, I want to get the email address from each selected row, output into a comma-separated string. I got it to work with the following code, but I'm ...
2votes
1answer
108views
Move timestamp to the next Monday 10:01 AM [closed]
I've been battling ChatGPT for hours now and can't get satisfied with this simple algorithm in TypeScript. These two (hopefully correct) TypeScript+ReactNative solutions should move the timestamp ...
5votes
1answer
139views
Partial Function Application in JavaScript
I'm trying to make a partial function from any function. Here is a working example: ...
1vote
1answer
59views
Click temporization on user interface elements
Implementation to accommodate different behaviours based on the frequency a user interface element is clicked. It supports number of clicks and number of clicks in a time frame. ...
3votes
1answer
134views
4votes
2answers
192views
Abundant number implementation
I have implementted a simple JavaScript function to find the list of abundant numbers and print them on the screen. an abundant number is a number for which the sum of its proper divisors is greater ...
1vote
1answer
140views
Transform an array into object and set index for an unique key in javascript
I have a method that merges keys and indexes from an array into an object. I'm stuck with ways to compress this method, and I don't know what I can do to make it simpler. Goal get an array of objects ...
1vote
2answers
208views
Simplify a function which performs manipulation of data in Javascript
Upon suggestion in the original question within Stack Overflow, I'm bringing my question here. We have created a function that will convert the data into the desired format, but it has a lot of code ...
4votes
0answers
216views
GeekTrust: Traffic problem - functional programming
First attempt to write functional programming, been following OO paradigm all through my programming journey Please review the code and let me know if any comments and violations of functional ...
4votes
2answers
3kviews
Download entire localStorage as file
I would like to download the entire contents from localStorage to a json file (in a "clear" formatting). I've tried this and it works perfectly. However, ...
0votes
2answers
84views
Processing list of users- filtering out from refused list
The code below takes a list of users and displays two lists Refused users Admitted users Sample output: Refuse: Phil, Lola. Admit: Chris, Anne, Colin, Terri, Sam, Kay, Bruce. Any feedback is ...
-2votes
2answers
111views